import { anyObject } from "../interface";

const _noParse = ['Form', 'FormItem'];

export const propsParse = (props: anyObject, name?: string) => {
  if (Object.keys(props).includes('initialValues') && name && !_noParse.includes(name)) {
    props['defaultValue'] = props['initialValues'];
    delete props['initialValues'];
  }
  return props;
}